package com.hpp.service.impl;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hpp.model.NewsType;
import com.hpp.persistence.NewsTypeMapper;
import com.hpp.service.INewsTypeService;

@Service
public class NewsTypeServiceImpl implements INewsTypeService {
	
	@Autowired
	NewsTypeMapper newsTypeMapper;

	@Override
	public NewsType getNewsType(HashMap<String, Object> map) {
		return newsTypeMapper.getNewsType(map);
	}

	@Override
	public List<NewsType> getNewsTypeList(HashMap<String, Object> map) {
		return newsTypeMapper.getNewsTypeList(map);
	}

	@Override
	public int deleteNewsType(HashMap<String, Object> map) {
		return newsTypeMapper.deleteNewsType(map);
	}

	@Override
	public int addNewsType(NewsType newsType) {
		return newsTypeMapper.insertSelective(newsType);
	}

	@Override
	public int updateNewsType(NewsType newsType) {
		return newsTypeMapper.updateByPrimaryKeySelective(newsType);
	}

}
